﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Services.Description;
using System.Windows.Forms;
using Microsoft.Extensions.DependencyInjection;

namespace ProductManagement.FrameworkClient
{
    internal static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var httpClient = new HttpClient();
            httpClient.BaseAddress = new Uri("https://localhost:7239/"); // 替换为WebAPI实际地址

            var serviceProvider = new ServiceCollection()
               .AddSingleton(httpClient)
               .BuildServiceProvider();
            Application.Run(new Form1(serviceProvider));
        }
    }
}
